package lanou3g.myfirstapp36kr.activity;

import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.FrameLayout;

import lanou3g.myfirstapp36kr.R;
import lanou3g.myfirstapp36kr.StringUrl;
import lanou3g.myfirstapp36kr.base.BaseActivity;

/**
 * Created by dllo on 16/8/13.
 */
public class MoneyQuickActivity extends BaseActivity  {
    private FrameLayout frameLayout;
    private WebView webView;
    @Override
    protected int getLayout() {
        return R.layout.activity_money_quick;
    }

    @Override
    protected void initView() {
        webView = (WebView) findViewById(R.id.web_moenyquick);
        frameLayout = (FrameLayout) findViewById(R.id.frame_layout_share_moneyquick);
        findViewById(R.id.iv_pop_moneyquick).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                frameLayout.setVisibility(View.VISIBLE);
            }
        });
        findViewById(R.id.iv_moneyquick_back).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        findViewById(R.id.tv_pop_turnpic_details_cancel).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                frameLayout.setVisibility(View.GONE);
            }
        });

    }

    @Override
    protected void initData() {
        WebViewClient webViewClient = new WebViewClient();
        webView.setWebViewClient(webViewClient);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
        webView.getSettings().setBuiltInZoomControls(true);
        openBrowers(StringUrl.stringMoneyQueck);

    }
    private void openBrowers(String url){
        webView.loadUrl(url);
    }
}
